package com.supermarket.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.supermarket.dao.InStockDao;
import com.supermarket.model.InStock;
import com.supermarket.service.IInStockFunction;

@Service
public class InStockFunctionImpl implements IInStockFunction {

	InStockDao isDao;

	public InStockDao getIsDao() {
		return isDao;
	}

	@Autowired
	public void setIsDao(InStockDao isDao) {
		this.isDao = isDao;
	}

	public void deleteById(Integer id) {
		isDao.deleteById(id);

	}

	public void addInStock(InStock instock) {
		isDao.addInStock(instock);

	}

	public List<InStock> queryInStock(String keyword) {
		return isDao.queryInStock(keyword);
	}

	public List<InStock> selectInStockByPagination() {
		List<InStock> list = isDao.selectInStockByPagination();
		return list;
	}

}
